\(\int (f+g x^3) \log (c (d+e x^2)^p) \, dx\) [290]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F(-2)]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 110 \[ \int \left (f+g x^3\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=-2 f p x+\frac {d g p x^2}{4 e}-\frac {1}{8} g p x^4+\frac {2 \sqrt {d} f p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {d^2 g p \log \left (d+e x^2\right )}{4 e^2}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right ) \]

[Out]

-2*f*p*x+1/4*d*g*p*x^2/e-1/8*g*p*x^4-1/4*d^2*g*p*ln(e*x^2+d)/e^2+f*x*ln(c*(e*x^2+d)^p)+1/4*g*x^4*ln(c*(e*x^2+d
)^p)+2*f*p*arctan(x*e^(1/2)/d^(1/2))*d^(1/2)/e^(1/2)

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {2521, 2498, 327, 211, 2504, 2442, 45} \[ \int \left (f+g x^3\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\frac {2 \sqrt {d} f p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right )-\frac {d^2 g p \log \left (d+e x^2\right )}{4 e^2}+\frac {d g p x^2}{4 e}-2 f p x-\frac {1}{8} g p x^4 \]

[In]

Int[(f + g*x^3)*Log[c*(d + e*x^2)^p],x]

[Out]

-2*f*p*x + (d*g*p*x^2)/(4*e) - (g*p*x^4)/8 + (2*Sqrt[d]*f*p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/Sqrt[e] - (d^2*g*p*Lo
g[d + e*x^2])/(4*e^2) + f*x*Log[c*(d + e*x^2)^p] + (g*x^4*Log[c*(d + e*x^2)^p])/4

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2498

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)], x_Symbol] :> Simp[x*Log[c*(d + e*x^n)^p], x] - Dist[e*n*p, Int[
x^n/(d + e*x^n), x], x] /; FreeQ[{c, d, e, n, p}, x]

Rule 2504

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rule 2521

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*((f_) + (g_.)*(x_)^(s_))^(r_.), x_Symbol]
:> With[{t = ExpandIntegrand[(a + b*Log[c*(d + e*x^n)^p])^q, (f + g*x^s)^r, x]}, Int[t, x] /; SumQ[t]] /; Free
Q[{a, b, c, d, e, f, g, n, p, q, r, s}, x] && IntegerQ[n] && IGtQ[q, 0] && IntegerQ[r] && IntegerQ[s] && (EqQ[
q, 1] || (GtQ[r, 0] && GtQ[s, 1]) || (LtQ[s, 0] && LtQ[r, 0]))

Rubi steps \begin{align*} \text {integral}& = \int \left (f \log \left (c \left (d+e x^2\right )^p\right )+g x^3 \log \left (c \left (d+e x^2\right )^p\right )\right ) \, dx \\ & = f \int \log \left (c \left (d+e x^2\right )^p\right ) \, dx+g \int x^3 \log \left (c \left (d+e x^2\right )^p\right ) \, dx \\ & = f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{2} g \text {Subst}\left (\int x \log \left (c (d+e x)^p\right ) \, dx,x,x^2\right )-(2 e f p) \int \frac {x^2}{d+e x^2} \, dx \\ & = -2 f p x+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right )+(2 d f p) \int \frac {1}{d+e x^2} \, dx-\frac {1}{4} (e g p) \text {Subst}\left (\int \frac {x^2}{d+e x} \, dx,x,x^2\right ) \\ & = -2 f p x+\frac {2 \sqrt {d} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right )-\frac {1}{4} (e g p) \text {Subst}\left (\int \left (-\frac {d}{e^2}+\frac {x}{e}+\frac {d^2}{e^2 (d+e x)}\right ) \, dx,x,x^2\right ) \\ & = -2 f p x+\frac {d g p x^2}{4 e}-\frac {1}{8} g p x^4+\frac {2 \sqrt {d} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {d^2 g p \log \left (d+e x^2\right )}{4 e^2}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.00 \[ \int \left (f+g x^3\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=-2 f p x+\frac {d g p x^2}{4 e}-\frac {1}{8} g p x^4+\frac {2 \sqrt {d} f p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {d^2 g p \log \left (d+e x^2\right )}{4 e^2}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right ) \]

[In]

Integrate[(f + g*x^3)*Log[c*(d + e*x^2)^p],x]

[Out]

-2*f*p*x + (d*g*p*x^2)/(4*e) - (g*p*x^4)/8 + (2*Sqrt[d]*f*p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/Sqrt[e] - (d^2*g*p*Lo
g[d + e*x^2])/(4*e^2) + f*x*Log[c*(d + e*x^2)^p] + (g*x^4*Log[c*(d + e*x^2)^p])/4

Maple [A] (verified)

Time = 0.71 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.95

method result size
parts \(\frac {g \,x^{4} \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )}{4}+f x \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )-\frac {p e \left (-\frac {-\frac {1}{4} e g \,x^{4}+\frac {1}{2} d g \,x^{2}-4 e f x}{e^{2}}+\frac {d \left (\frac {d g \ln \left (e \,x^{2}+d \right )}{2 e}-\frac {4 e f \arctan \left (\frac {x e}{\sqrt {d e}}\right )}{\sqrt {d e}}\right )}{e^{2}}\right )}{2}\) \(104\)
risch \(\left (\frac {1}{4} g \,x^{4}+f x \right ) \ln \left (\left (e \,x^{2}+d \right )^{p}\right )+\frac {i \operatorname {csgn}\left (i c \right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} x^{4} g \pi }{8}-\frac {i \pi g \,x^{4} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )}{8}+\frac {i {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) x^{4} g \pi }{8}-\frac {i x \pi f \,\operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )}{2}+\frac {i x \pi f \,\operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2}}{2}-\frac {i x \pi f {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}}{2}+\frac {i x \pi f {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )}{2}-\frac {i \pi g \,x^{4} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}}{8}+\frac {\ln \left (c \right ) g \,x^{4}}{4}-\frac {g p \,x^{4}}{8}+\frac {d g p \,x^{2}}{4 e}+\ln \left (c \right ) f x +\frac {p \ln \left (-\sqrt {-d e}\, x +d \right ) f \sqrt {-d e}}{e}-\frac {p \ln \left (-\sqrt {-d e}\, x +d \right ) d^{2} g}{4 e^{2}}-\frac {p \ln \left (\sqrt {-d e}\, x +d \right ) f \sqrt {-d e}}{e}-\frac {p \ln \left (\sqrt {-d e}\, x +d \right ) d^{2} g}{4 e^{2}}-2 f p x\) \(402\)

[In]

int((g*x^3+f)*ln(c*(e*x^2+d)^p),x,method=_RETURNVERBOSE)

[Out]

1/4*g*x^4*ln(c*(e*x^2+d)^p)+f*x*ln(c*(e*x^2+d)^p)-1/2*p*e*(-1/e^2*(-1/4*e*g*x^4+1/2*d*g*x^2-4*e*f*x)+d/e^2*(1/
2*d*g/e*ln(e*x^2+d)-4*e*f/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))))

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 250, normalized size of antiderivative = 2.27 \[ \int \left (f+g x^3\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\left [-\frac {e^{2} g p x^{4} - 2 \, d e g p x^{2} - 8 \, e^{2} f p \sqrt {-\frac {d}{e}} \log \left (\frac {e x^{2} + 2 \, e x \sqrt {-\frac {d}{e}} - d}{e x^{2} + d}\right ) + 16 \, e^{2} f p x - 2 \, {\left (e^{2} g p x^{4} + 4 \, e^{2} f p x - d^{2} g p\right )} \log \left (e x^{2} + d\right ) - 2 \, {\left (e^{2} g x^{4} + 4 \, e^{2} f x\right )} \log \left (c\right )}{8 \, e^{2}}, -\frac {e^{2} g p x^{4} - 2 \, d e g p x^{2} - 16 \, e^{2} f p \sqrt {\frac {d}{e}} \arctan \left (\frac {e x \sqrt {\frac {d}{e}}}{d}\right ) + 16 \, e^{2} f p x - 2 \, {\left (e^{2} g p x^{4} + 4 \, e^{2} f p x - d^{2} g p\right )} \log \left (e x^{2} + d\right ) - 2 \, {\left (e^{2} g x^{4} + 4 \, e^{2} f x\right )} \log \left (c\right )}{8 \, e^{2}}\right ] \]

[In]

integrate((g*x^3+f)*log(c*(e*x^2+d)^p),x, algorithm="fricas")

[Out]

[-1/8*(e^2*g*p*x^4 - 2*d*e*g*p*x^2 - 8*e^2*f*p*sqrt(-d/e)*log((e*x^2 + 2*e*x*sqrt(-d/e) - d)/(e*x^2 + d)) + 16
*e^2*f*p*x - 2*(e^2*g*p*x^4 + 4*e^2*f*p*x - d^2*g*p)*log(e*x^2 + d) - 2*(e^2*g*x^4 + 4*e^2*f*x)*log(c))/e^2, -
1/8*(e^2*g*p*x^4 - 2*d*e*g*p*x^2 - 16*e^2*f*p*sqrt(d/e)*arctan(e*x*sqrt(d/e)/d) + 16*e^2*f*p*x - 2*(e^2*g*p*x^
4 + 4*e^2*f*p*x - d^2*g*p)*log(e*x^2 + d) - 2*(e^2*g*x^4 + 4*e^2*f*x)*log(c))/e^2]

Sympy [A] (verification not implemented)

Time = 16.50 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.95 \[ \int \left (f+g x^3\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\begin {cases} \left (f x + \frac {g x^{4}}{4}\right ) \log {\left (0^{p} c \right )} & \text {for}\: d = 0 \wedge e = 0 \\\left (f x + \frac {g x^{4}}{4}\right ) \log {\left (c d^{p} \right )} & \text {for}\: e = 0 \\- 2 f p x + f x \log {\left (c \left (e x^{2}\right )^{p} \right )} - \frac {g p x^{4}}{8} + \frac {g x^{4} \log {\left (c \left (e x^{2}\right )^{p} \right )}}{4} & \text {for}\: d = 0 \\- \frac {d^{2} g \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{4 e^{2}} + \frac {2 d f p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{e \sqrt {- \frac {d}{e}}} - \frac {d f \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{e \sqrt {- \frac {d}{e}}} + \frac {d g p x^{2}}{4 e} - 2 f p x + f x \log {\left (c \left (d + e x^{2}\right )^{p} \right )} - \frac {g p x^{4}}{8} + \frac {g x^{4} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{4} & \text {otherwise} \end {cases} \]

[In]

integrate((g*x**3+f)*ln(c*(e*x**2+d)**p),x)

[Out]

Piecewise(((f*x + g*x**4/4)*log(0**p*c), Eq(d, 0) & Eq(e, 0)), ((f*x + g*x**4/4)*log(c*d**p), Eq(e, 0)), (-2*f
*p*x + f*x*log(c*(e*x**2)**p) - g*p*x**4/8 + g*x**4*log(c*(e*x**2)**p)/4, Eq(d, 0)), (-d**2*g*log(c*(d + e*x**
2)**p)/(4*e**2) + 2*d*f*p*log(x - sqrt(-d/e))/(e*sqrt(-d/e)) - d*f*log(c*(d + e*x**2)**p)/(e*sqrt(-d/e)) + d*g
*p*x**2/(4*e) - 2*f*p*x + f*x*log(c*(d + e*x**2)**p) - g*p*x**4/8 + g*x**4*log(c*(d + e*x**2)**p)/4, True))

Maxima [F(-2)]

Exception generated. \[ \int \left (f+g x^3\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((g*x^3+f)*log(c*(e*x^2+d)^p),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(e>0)', see `assume?` for more
details)Is e

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.89 \[ \int \left (f+g x^3\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=-\frac {1}{8} \, {\left (g p - 2 \, g \log \left (c\right )\right )} x^{4} + \frac {d g p x^{2}}{4 \, e} + \frac {2 \, d f p \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{\sqrt {d e}} - \frac {d^{2} g p \log \left (e x^{2} + d\right )}{4 \, e^{2}} - {\left (2 \, f p - f \log \left (c\right )\right )} x + \frac {1}{4} \, {\left (g p x^{4} + 4 \, f p x\right )} \log \left (e x^{2} + d\right ) \]

[In]

integrate((g*x^3+f)*log(c*(e*x^2+d)^p),x, algorithm="giac")

[Out]

-1/8*(g*p - 2*g*log(c))*x^4 + 1/4*d*g*p*x^2/e + 2*d*f*p*arctan(e*x/sqrt(d*e))/sqrt(d*e) - 1/4*d^2*g*p*log(e*x^
2 + d)/e^2 - (2*f*p - f*log(c))*x + 1/4*(g*p*x^4 + 4*f*p*x)*log(e*x^2 + d)

Mupad [B] (verification not implemented)

Time = 2.16 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.85 \[ \int \left (f+g x^3\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx=f\,x\,\ln \left (c\,{\left (e\,x^2+d\right )}^p\right )-\frac {g\,p\,x^4}{8}-2\,f\,p\,x+\frac {g\,x^4\,\ln \left (c\,{\left (e\,x^2+d\right )}^p\right )}{4}+\frac {d\,g\,p\,x^2}{4\,e}+\frac {2\,\sqrt {d}\,f\,p\,\mathrm {atan}\left (\frac {\sqrt {e}\,x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {d^2\,g\,p\,\ln \left (e\,x^2+d\right )}{4\,e^2} \]

[In]

int(log(c*(d + e*x^2)^p)*(f + g*x^3),x)

[Out]

f*x*log(c*(d + e*x^2)^p) - (g*p*x^4)/8 - 2*f*p*x + (g*x^4*log(c*(d + e*x^2)^p))/4 + (d*g*p*x^2)/(4*e) + (2*d^(
1/2)*f*p*atan((e^(1/2)*x)/d^(1/2)))/e^(1/2) - (d^2*g*p*log(d + e*x^2))/(4*e^2)